<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
	<script>
		function fn() {
		    this.a = 0;
		    this.b = function() {
		        alert(this.a)
		    }
		}
		fn.prototype = {
		    b: function() {
		        this.a = 20;
		        alert(this.a);
		    },
		    c: function() {
		        this.a = 30;
		        alert(this.a);
		    }
		}
		var myfn = new fn();
		alert(myfn.b());
		alert(myfn.c());
		// 0 undefined 30 undefined
	</script>
</body>
</html>